package com.caifu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.caifu.pojo.YlCost;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 费用信息表 Mapper 接口
 * </p>
 *
 * @author GZ
 * @since 2020-11-09
 */
public interface YlCostMapper extends BaseMapper<YlCost> {
    /**
    * 
    * 功能描述：根据名称查询费用信息
    * 
    * @Param costName 费用名称 costType费用类型  pensionNo 养老机构编号
    * @Return      
    * @Exception   
    * @Author  GZ
    * @Date   2020/11/9 19:04
    */
    @Select({"<script>",
            "SELECT * FROM yl_cost c where c.STATUS=1",
            "<if test='costName != null '>",
            "and c.COST_NAME=#{costName}",
            "</if>",
            "and c.PENSION_NO=#{pensionNo}",
            "and c.COST_TYPE=#{costType}",
    "</script>"})
    YlCost queryCostInfo(@Param("costName") String costName
            ,@Param("costType") String costType,@Param("pensionNo") String pensionNo);
}
